
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<%@ page contentType="text/html; charset=utf-8"%>
	<%@ include file="/commons/taglibs.jsp"%>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
		<title>信息终端批呈导出</title>
		<%@ include file="/commons/css_js_head.jsp"%>


	</head>
<script type="text/javascript">
doSaveUrl = "${ctx }/base/tsMachinesAction!exportMachines.ts" 
function doSave(batch){


	if (doSaveUrl == '') {
		alert('请设置正确的URL!');
		return false;
	}
    
	if(batch==""){
	alert("请选择要导出的信息终端");
	return false;
	}else{
	$.ajax({
              type : "post",
              url : doSaveUrl ,
              cache: false,
              data : "batch=" + batch,
              dataType:"json",
              success : function(data){  
             // alert(data.path);
              if( data.result== "1" )
               {
                   //alert("操作成功");
                   window.location.href="../"+data.filename+"";
                   
                }
               else
               {
                   alert("操作失败");
                   parent.window.location.reload();
               }
              },
              error: function(){alert("服务器没有数据返回，可能服务器忙，请重试");}
           });
	
	}

	
}
function closeWidows()
		{
			self.parent.tb_remove();
		}
		
</script>
	<body style="overflow-x: hidden">
		<div class="mTitle">
			<span class="hidsearch"></span>
			<b class="bbig">信息终端导出</b> 
		</div>

		<div class="mainList">

			<table class="listTable">
				<tr>
					<th>序号</th>
					
					
					<th>批次</th>
					<th>
						操作
					</th>
				</tr>

				<c:forEach var="batch" varStatus="status" items="${resList}">
					<tr align=center>
						<td>${status.index+1} </td>
						
						<td>
						${batch}
						</td>
						<td>
							<a href="javascript:void(0)" onclick="javascript:doSave('${batch}');">
							<span class="icon_edit">&nbsp;</span>导出</a>	
							
						</td>
					</tr>
				</c:forEach>
				
			</table>
			<button class="btn" id="close_button" onclick="closeWidows();" title="关闭窗口" style="width:80px;"><b>关闭窗口</b></button>
		</div>
	</body>


</html>
